home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1995 March / macformat-022.iso / Shareware City / Developers / src / out-of-phase-102-c / OutOfPhase 1.02 Source / OutOfPhase Folder / CompilerParser.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-11-23  |  3.9 KB  |  101 lines  |  [TEXT/KAHL]

  1. /* CompilerParser.h */
  2.  
  3. #ifndef Included_CompilerParser_h
  4. #define Included_CompilerParser_h
  5.  
  6. /* CompilerParser module depends on */
  7. /* MiscInfo.h */
  8. /* Audit */
  9. /* Debug */
  10. /* Definitions */
  11. /* CompilerRoot */
  12. /* SymbolTableEntry */
  13. /* ASTExpression */
  14. /* SymbolTable */
  15. /* TrashTracker */
  16. /* SymbolList */
  17. /* PcodeObject */
  18. /* Memory */
  19. /* ASTAssignment */
  20. /* ASTBinaryOperator */
  21. /* ASTErrorForm */
  22. /* ASTLoop */
  23. /* ASTArrayDeclaration */
  24. /* ASTVariableDeclaration */
  25. /* ASTConditional */
  26. /* ASTUnaryOperator */
  27. /* ASTOperand */
  28. /* ASTFuncCall */
  29. /* ASTExpressionList */
  30. /* ASTWaveGetter */
  31. /* FloatingPoint */
  32.  
  33. #include "CompilerRoot.h" /* error type */
  34.  
  35. /* all objects created from this routine are allocated with TrashTracker. */
  36.  
  37. /* forward declarations */
  38. struct SymbolTableRec;
  39. struct TrashTrackRec;
  40. struct SymbolRec;
  41. struct ASTExpressionRec;
  42. struct ScannerRec;
  43. struct SymbolTableRec;
  44. struct ASTExprListRec;
  45.  
  46. /* parse a top-level form, which is either a prototype or a function.  prototypes */
  47. /* are entered into the symbol table and return NIL in *FunctionBodyOut but returns */
  48. /* eCompileNoError. */
  49. /*   1:   <form>             ::= <function> ; */
  50. /*   2:                      ::= <prototype> ; */
  51. /* FIRST SET: */
  52. /* <form>             : {func, proto, <function>, <prototype>} */
  53. /* FOLLOW SET: */
  54. /* <form>             : {$$$} */
  55. CompileErrors                    ParseForm(struct SymbolRec** FunctionSymbolTableEntryOut,
  56.                                                 struct ASTExpressionRec** FunctionBodyOut,
  57.                                                 struct ScannerRec* Scanner, struct SymbolTableRec* SymbolTable,
  58.                                                 struct TrashTrackRec* TrashTracker, long* LineNumberOut);
  59.  
  60.  
  61. /*   22:   <expr>             ::= <prototype> */
  62. /*   26:   <expr>             ::= <expr2> */
  63. /*  109:   <expr>             ::= if <ifrest> */
  64. /*  114:   <expr>             ::= <whileloop> */
  65. /*  115:                      ::= do <expr> <loopwhileuntil> */
  66. /*  116:                      ::= <untilloop> */
  67. /*  121:   <expr>             ::= set <expr> := <expr> */
  68. /*  125:   <expr>             ::= resize <expr> to <expr> */
  69. /*  126:                      ::= error <string> resumable <expr> */
  70. /* FIRST SET: */
  71. /*  <expr>             : {<identifier>, <integer>, <single>, <double>, <fixed>, */
  72. /*       <string>, bool, int, single, double, fixed, proto, var, not, sin, cos, */
  73. /*       tan, asin, acos, atan, ln, exp, sqr, sqrt, abs, neg, sign, length, if, */
  74. /*       while, until, do, resize, error, maxint, minint, maxsingle, minsingle, */
  75. /*       maxdouble, mindouble, maxfixed, minfixed, true, false, set, (, -, */
  76. /*       <prototype>, <expr2>, <expr3>, <expr4>, <expr5>, <expr6>, <unary_oper>, */
  77. /*       <expr7>, <expr8>, <whileloop>, <untilloop>} */
  78. /* FOLLOW SET: */
  79. /*  <expr>             : {then, else, elseif, while, until, do, to, ), CLOSEBRACKET, */
  80. /*       ,, :=, ;, <actualtail>, <iftail>, <loopwhileuntil>, <exprlisttail>} */
  81. CompileErrors                    ParseExpr(struct ASTExpressionRec** ExpressionOut,
  82.                                                 struct ScannerRec* Scanner, struct SymbolTableRec* SymbolTable,
  83.                                                 struct TrashTrackRec* TrashTracker, long* LineNumberOut);
  84.  
  85. /*  124:   <exprlist>         ::= <exprlistelem> <exprlisttail> */
  86. /* FIRST SET: */
  87. /*  <exprlist>         : {<identifier>, <integer>, <single>, <double>, <fixed>, */
  88. /*       <string>, bool, int, single, double, fixed, proto, var, not, sin, */
  89. /*       cos, tan, asin, acos, atan, ln, exp, sqr, sqrt, abs, neg, sign, */
  90. /*       length, if, while, until, do, resize, error, maxint, minint, maxsingle, */
  91. /*       minsingle, maxdouble, mindouble, maxfixed, minfixed, true, false, */
  92. /*       set, (, -, <prototype>, <expr>, <expr2>, <expr3>, <expr4>, <expr5>, */
  93. /*       <expr6>, <unary_oper>, <expr7>, <expr8>, <whileloop>, <untilloop>} */
  94. /* FOLLOW SET: */
  95. /*  <exprlist>         : {), CLOSEBRACKET} */
  96. CompileErrors                    ParseExprList(struct ASTExprListRec** ExpressionOut,
  97.                                                 struct ScannerRec* Scanner, struct SymbolTableRec* SymbolTable,
  98.                                                 struct TrashTrackRec* TrashTracker, long* LineNumberOut);
  99.  
  100. #endif
  101.